<?php 
	$dir = "./image/screen";
	$pattern = '\.(jpg|png|gif)$';
	
	
	$dc = opendir($dir);
	while ($fn = readdir($dc)) {
	  # Eliminate current directory, parent directory
	  if (ereg('^\.{1,2}$',$fn)) continue;
	  # Eliminate other pages not in pattern
	  if (! ereg($pattern,$fn)) continue;
	  
	  echo $fn . "<br>";	  

	}
?>